import Vue from 'vue'
import Router from 'vue-router'
import Login from "../view/login/Login";
import managerMain from "../view/manager/managerMain";
import tenantLogin from "../view/tenant/tenantLogin";
import tenant_main from "../view/tenant/tanant_main"
import tenant_lease from "../view/tenant/tenant_lease";
import tenant_personaliInfo from "../view/tenant/tenant_personaliInfo";
import tenant_repaire from "../view/tenant/tenant_repaire";
Vue.use(Router)


const router = new Router({
  mode:"history",
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login
    },
    {
      path:'/login',
      component:() => import('../view/login/Login.vue'),
      meta: {title:'管理员登录'}
    },
    {
      path: '/manager',
      name: 'manager',
      component: managerMain
    },
    //ly
    {
      path: '/tenantLogin',
      name: 'tenantLogin',
      component: tenantLogin
    },
    {
      path: '/tenant_main',
      name: 'tenant_main',
      component: tenant_main
    },
    {
      path: '/tenant_lease',
      name: 'tenant_lease',
      component: tenant_lease
    },
    {
      path: '/tenant_personaliInfo',
      name: 'tenant_personaliInfo',
      component: tenant_personaliInfo
    },
    {
      path: '/tenant_repaire',
      name: 'tenant_repaire',
      component: tenant_repaire
    },
    //yx
    {
      path:'/loginHouseOwner',
      component:() => import('../view/houseowner/LoginHouseOwner.vue'),
      meta: {title:'房主登录'}
    },

    {
      path:'/homeHouseOwner',
      component:() => import('../view/houseowner/HomeHouseOwner.vue'),
      meta: {title:'欢迎您！'},
      children:[
        {
          path:'/houseOwnerCenter',
          component:() => import('../view/houseowner/HouseOwnerCenter.vue'),
          meta:{title:'个人中心'},
        },
        {
          path:'/changePwd',
          component:() =>import('../view/houseowner/ChangePwd.vue'),
          meta: {title:'修改密码'}
        },
        {
          path:'/changeMyHouse',
          component:() =>import('../view/houseowner/ChangeMyHouse.vue'),
          meta: {title:'管理房子'}
        },
        {
          path:'/messageTips',
          component:() =>import('../view/houseowner/MessageTips.vue'),
          meta: {title:'系统消息'}
        },
      ]
    }
  ]
})



export default router
